/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    width: 90%;
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: contentSlideIn 0.3s ease-out;
}

@keyframes contentSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    width: 100%;
}

.auth-form h2 {
    color: #1d1d1f;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 20px;
    width: 100%;
}

.auth-form input {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.03);
    font-size: 16px;
    color: #1d1d1f;
    transition: all 0.3s ease;
}

.auth-form button {
    background: #007AFF;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

.auth-form button:hover {
    background: #0066CC;
    transform: translateY(-1px);
}

.auth-form p {
    text-align: center;
    color: #86868b;
    margin: 10px 0;
}

.auth-form a {
    color: #007AFF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-form a:hover {
    color: #0066CC;
}

.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.avatar-upload label {
    color: #1d1d1f;
    font-size: 16px;
    margin-bottom: 5px;
}

.avatar-upload input[type="file"] {
    display: none;
}

.avatar-upload .file-input-label {
    background: rgba(0, 122, 255, 0.1);
    color: #007AFF;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

.avatar-upload .file-input-label:hover {
    background: rgba(0, 122, 255, 0.15);
}

#avatarPreview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#avatarPreview:hover {
    transform: scale(1.05);
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #fff;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    padding: 20px;
    max-width: 800px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 80px;
}

.main-title {
    font-size: 3rem;
    color: #f5f5f7;
    margin-bottom: 10px;
}

.main-subtitle {
    font-size: 1.2rem;
    color: #a1a1a6;
}

.avatar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #f5f5f7;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.section {
    background-color: #1c1c1e;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    margin-top: 40px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.section:hover {
    transform: translateY(-5px);
}

.section-title {
    font-size: 2rem;
    color: #f5f5f7;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00a1d6, transparent);
}

.section-content {
    font-size: 1.2rem;
    color: #d1d1d6;
    line-height: 1.6;
}

.emoji {
    font-style: normal;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding: 0 5px;
}

.container:hover .main-title {
    color: #d1d1d6;
    transition: color 0.3s ease;
}

.footer {
    margin-top: 40px;
    font-size: 1rem;
    color: #a1a1a6;
}

.footer a {
    color: #1e90ff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.like-button {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #333;
    color: #f5f5f7;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease, transform 0.2s ease;
    overflow: hidden;
    position: relative;
}

.like-button:hover {
    background-color: #444;
    transform: scale(1.05);
}

.like-count {
    font-size: 1rem;
    color: #d1d1d6;
}

.heart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 1.5rem;
    color: red;
    opacity: 0;
    pointer-events: none;
    animation: none;
}

@keyframes pop {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

.show-text {
    display: inline-block;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #f7d794);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    animation: gradient 4s ease infinite, bounce 2s ease infinite;
    position: relative;
    font-size: 1.2em;
    letter-spacing: 2px;
    padding: 0 5px;
}

.show-text::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #f7d794);
    z-index: -1;
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 4px;
}

.show-text:hover::before {
    opacity: 0.7;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.show-text:hover {
    animation-play-state: paused;
    transform: scale(1.1);
    transition: transform 0.3s ease;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.title-divider {
    width: 60%;
    margin: 20px auto;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent,
        rgba(255, 255, 255, 0.3) 20%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0.3) 80%,
        transparent
    );
    position: relative;
    overflow: visible;
}

.title-divider::after {
    content: '✧';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #000;
    padding: 0 15px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* 修改轮播容器样式 */
.carousel-container {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.carousel-section {
    background: rgba(28, 28, 30, 0.8);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.carousel-title {
    color: #f5f5f7;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: left;
    padding-left: 20px;
    position: relative;
    font-weight: 600;
}

.carousel-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, #00a1d6, #00b5e5);
    border-radius: 2px;
}

.carousel {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 12px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.carousel-track img {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    object-fit: cover;
    filter: brightness(0.95);
    transition: filter 0.3s ease;
}

.carousel-track img:hover {
    filter: brightness(1.05);
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.2rem;
    z-index: 2;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.carousel:hover .carousel-button {
    opacity: 1;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.carousel-button.prev {
    left: 20px;
}

.carousel-button.next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.carousel-dot.active {
    width: 18px;
    border-radius: 3px;
    background: #00a1d6;
}

/* 添加响应式布局 */
@media (max-width: 768px) {
    .carousel-container {
        width: 95%;
        gap: 30px;
    }

    .carousel {
        height: 300px;
    }

    .carousel-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
}

/* 添加新样式 */
.gallery-link {
    margin-top: 30px;
    text-align: center;
}

.view-gallery {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(45deg, #00a1d6, #00b5e5);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 161, 214, 0.3);
}

.view-gallery:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 161, 214, 0.4);
}

.back-to-home {
    margin: 40px 0;
    text-align: center;
}

.home-link {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #f5f5f7;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.home-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 顶部导航栏 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-left {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-right {
    position: absolute;
    right: 20px;
}

/* 用户信息样式 */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.user-nickname {
    font-weight: 500;
    color: #24292e;
}

.user-likes {
    color: #586069;
}

.avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.avatar-img:hover {
    transform: scale(1.1);
}

/* 点赞按钮样式 */
.like-button {
    background: none;
    border: none;
    font-size: 24px;
    color: #ff4136;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.like-button:hover {
    background-color: rgba(255, 65, 54, 0.1);
    transform: scale(1.05);
}

.like-count {
    font-size: 18px;
    font-weight: 500;
}

/* 排行榜样式 */
.leaderboard {
    position: fixed;
    right: 40px;
    top: 100px;
    width: 300px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.leaderboard-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

.leaderboard-content h3 {
    font-size: 15px;
    margin: 10px 0;
    padding: 0 8px;
    color: #1a1a1a;
    font-weight: 600;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    font-size: 13px;
    background: #ffffff;
}

.leaderboard-item:hover {
    background-color: #f0f7ff;
}

.leaderboard-item .rank {
    min-width: 24px;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

.leaderboard-item .leaderboard-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin: 0 8px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
}

.leaderboard-item .nickname {
    flex: 1;
    margin-right: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    color: #2c3e50;
}

.leaderboard-item .likes {
    color: #e74c3c;
    font-weight: 500;
    min-width: 45px;
    text-align: right;
}

.leaderboard-item:nth-child(-n+3) .rank {
    color: #e74c3c;
    font-weight: 700;
}

.leaderboard-item:nth-child(1) .rank {
    color: #f1c40f;
}

.leaderboard-item:nth-child(2) .rank {
    color: #95a5a6;
}

.leaderboard-item:nth-child(3) .rank {
    color: #d35400;
}

/* 头像上传预览 */
.avatar-upload {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#avatarPreview {
    border-radius: 50%;
    object-fit: cover;
    margin-top: 10px;
}

.secondary-button {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #1d1d1f !important;
    margin-top: 10px !important;
}

.secondary-button:hover {
    background: rgba(0, 0, 0, 0.1) !important;
}

#userAvatar {
    cursor: pointer;
}

#newAvatarPreview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin: 20px 0;
}